package com.xbs.service.user;

import java.util.ArrayList;
import java.util.List;

import com.xbs.dao.user.UserDao;
import com.xbs.entity.UserEntity;
/**
 * user的服务层
 * @author 余凯
 *
 */
public class RegService {
	private UserDao ud;
	
	public RegService(){
		ud = new UserDao();
	}
	
	/**
	 * 1.注册成功后，向用户表插入数据
	 * @param user
	 * @return
	 */
	public void insertuser(UserEntity user){
		int row = ud.insertuser(user);
	}
	/**
	 * 2.获取所有的用户
	 * @return
	 */
	public List<UserEntity>  getUserlst(){
		List<UserEntity> user = new ArrayList<UserEntity>();
		user=ud.selAll();
		return user;
	}
	
}
